<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>栏目管理</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" type="text/css" href="__ADMIN__/layui/css/layui.css" media="all">
  <link rel="stylesheet" type="text/css" href="__ADMIN__/bootstrap/css/bootstrap.css" media="all">
  <link rel="stylesheet" type="text/css" href="__ADMIN__/global.css" media="all">
  <link rel="stylesheet" type="text/css" href="__ADMIN__/css/personal.css" media="all">
  <script type="text/javascript" src="__ADMIN__/jedate/jquery-1.7.2.js"></script>
</head>
<body>
<blockquote class="layui-elem-quote mylog-info-tit">
  <ul class="layui-tab-title">
    <a href="/admin/category"><li class="layui-btn"><i class="layui-icon"></i>返回栏目列表</li></a>
  </ul>
</blockquote>
<form class="layui-form" action="/admin/category/add" method="post">   
<div class="layui-tab layui-tab-card">
  <ul class="layui-tab-title">
    <li class="layui-this">基本设置</li>
    <li>SEO配置</li>
    <li id="cof">模板配置</li>
  </ul>
  <div class="layui-tab-content">
    <div class="layui-tab-item layui-show">
      <!-- 基本设置 -->
      <table class="layui-table">
      <colgroup>
        <col width="200">
        <col>
      </colgroup>
      <tbody>
        <if condition="$info['cate_type'] eq 1">
        <tr>
          <td><label>请选择模型</label></td>
          <td>
            <div class="layui-input-inline">
               <select lay-filter="test" name="modelid">
                 <volist name="model" id="vo">
                 <option value="{$vo.modelid}" <if condition="$info['modelid'] eq $vo['modelid']" > selected </if> >{$vo.name}</option>
                 </volist>
               </select>
           </div>
          </td>
        </tr>
        </if>
         <tr>
          <td><label>上级栏目</label></td>
          <td>
            <div class="layui-input-inline">
               <select lay-filter="test" name="parentid">
                 <option value="0">作为一级栏目</option>
                 <volist name="category" id="vo">
                 <option value="{$vo.cateid}" <if condition="$info['cateid'] eq $vo['cateid']" > selected </if> />{$vo.catename}</option>
                 </volist>
               </select>
           </div>
          </td>
        </tr>
        <if condition="$info['cate_type'] eq 1">
        <tr id="no">
          <td><label>添加方式</label></td>
          <td>
            <div class="layui-input-inline">
              <span id="normal"><input name="type" value="1" checked="" title="单条添加" type="radio"></span>
              <span id="batch"><input name="type" value="2" title="批量添加"  type="radio"></span>
            </div>
          </td>
        </tr>
        </if>
         <tr>
          <td>
            <font color="red">*</font>
            <label>栏目名称</label>
          </td>
          <td>
            <div class="layui-input-inline" style="width: 250px;">
                <input id="normal_add" name="catename" placeholder="指定栏目名称"  autocomplete="off" class="layui-input" type="text">
                <br>
                <textarea id="batch_add" name="c_name" placeholder="请输入内容,用英文,分割。例如：文章,下载" class="layui-textarea" style="display:none"></textarea>
              </div>
            </div>
          </td>
        </tr>
        <tr id="path">
          <td>
            <font color="red">*</font>
            <label>目录名</label>
          </td>
          <td>
            <div class="layui-input-inline" style="width: 250px;">
                <input id="path_add" name="pathname" autocomplete="off" class="layui-input" type="text">
            </div>
          </td>
        </tr>
         <tr>
          <td>
            <label>栏目描述</label>
          </td>
          <td>
            <div class="layui-input-inline" style="width: 250px;">
                <input name="description" autocomplete="off" class="layui-input" type="text">
            </div>
          </td>
        </tr>
        <tr>
          <td><label>是否在导航显示</label></td>
          <td>
            <div class="layui-input-inline">
              <input name="is_nav" value="1" title="是" checked="" type="radio">
              <input name="is_nav" value="0" title="否" type="radio">
            </div>
          </td>
        </tr>
        <tr>
          <td><label>是否为终极栏目 </label><br>
              <font color="red" size="2">终极栏目才可以 编辑/修改 信息</font></td>
          <td>
            <div class="layui-input-inline">
              <input name="is_final" value="1" title="是" type="radio">
              <input name="is_final" value="0" title="否" checked="" type="radio">
            </div>
          </td>
        </tr>
        <if condition="$info['cate_type'] eq 1">
        <tr>
          <td><label>是否外部链接</label></td>
          <td>
            <div class="layui-input-inline">
              <span id="is_url"><input name="is_outer" value="1" title="是" type="radio"></span>
              <span id="no_url"><input name="is_outer" value="0" title="否" checked="" type="radio"></sapn>
            </div>
          </td>
        </tr>
        <tr id="cate_url" style="display:none">
          <td>
             <label>指定栏目地址(外部)</label>
             <br>
             <font color="red" size="2">指定地址后，栏目的url就变成此项的值</font>
          </td>
          <td>
            <div class="layui-input-inline" style="width: 250px;">
                <input name="cate_url" placeholder="指定栏目地址" autocomplete="off" class="layui-input" type="text">
            </div>
          </td>
        </tr>
        <else />
          <tr>
          <td>
             <label>指定栏目地址(外部)</label>
             <br>
             <font color="red" size="2">指定地址后，栏目的url就变成此项的值</font>
          </td>
          <td>
            <div class="layui-input-inline" style="width: 250px;">
                <input name="cate_url" placeholder="指定栏目地址" autocomplete="off" class="layui-input" type="text">
            </div>
          </td>
        </tr>
        </if>
        <tr>
          <td>
            <label>分页显示</label>
          </td>
          <td>
            <div class="layui-input-inline" style="width: 250px;">
                <input name="pagesize" value="10" autocomplete="off" class="layui-input" type="text">
            </div>
          </td>
        </tr>
        <tr>
          <td>
            <label>排序</label>
          </td>
          <td>
            <div class="layui-input-inline" style="width: 250px;">
                <input name="sort" value="0" autocomplete="off" class="layui-input" type="text">
            </div>
          </td>
        </tr>
       
      </tbody>
    </table>
    <div class="layui-form-item">
      <div class="layui-input-block">
        <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
      </div>
    </div>
    </div>
    <div class="layui-tab-item">
      <!-- SEO配置 -->
      <table class="layui-table">
      <colgroup>
        <col width="180">
        <col>
      </colgroup>
      <tbody>
        <tr>
          <td>
            <label>SEO栏目标题</label>
          </td>
          <td>
            <div class="layui-input-inline" style="width: 250px;">
                <input name="seo_title" placeholder="针对搜索引擎设置的标题" autocomplete="off" class="layui-input" type="text">
            </div>
          </td>
        </tr>
        <tr>
          <td>
            <label>SEO栏目关键字</label>
          </td>
          <td>
            <div class="layui-input-inline" style="width: 250px;">
                <input name="seo_keywords" placeholder="针对搜索引擎设置的关键字" autocomplete="off" class="layui-input" type="text">
            </div>
          </td>
        </tr>
        <tr>
          <td>
            <label>SEO栏目描述</label>
          </td>
          <td>
            <div class="layui-input-inline" style="width: 250px;">
                <input name="seo_description" placeholder="针对搜索引擎设置的栏目描述" autocomplete="off" class="layui-input" type="text">
            </div>
          </td>
        </tr>
        <tr>
          <td>
            <label>手机版SEO栏目标题</label>
          </td>
          <td>
            <div class="layui-input-inline" style="width: 250px;">
                <input name="m_seo_title" placeholder="针对手机版搜索引擎设置的栏目标题" autocomplete="off" class="layui-input" type="text">
            </div>
          </td>
        </tr>
        <tr>
          <td>
            <label>手机版SEO栏目关键字</label>
          </td>
          <td>
            <div class="layui-input-inline" style="width: 250px;">
                <input name="m_seo_keywords" placeholder="针对手机版搜索引擎设置的栏目关键字" autocomplete="off" class="layui-input" type="text">
            </div>
          </td>
        </tr>
        <tr>
          <td>
            <label>手机版SEO栏目描述</label>
          </td>
          <td>
            <div class="layui-input-inline" style="width: 250px;">
                <input name="m_seo_description" placeholder="针对手机版搜索引擎设置的栏目描述" autocomplete="off" class="layui-input" type="text">
            </div>
          </td>
        </tr>
      </tbody>
    </table>
    <div class="layui-form-item">
      <div class="layui-input-block">
        <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
      </div>
    </div>
    </div>
    <div class="layui-tab-item" id="see_height">
      <!-- 模板配置 -->
       <table class="layui-table">
      <colgroup>
        <col width="150">
        <col>
      </colgroup>
      <tbody>
        <if condition="$info['cate_type'] eq 1">
         <tr>
          <td><label>栏目模板</label></td>
          <td>
            <div class="layui-input-inline" style="width:500px;">
               <select lay-filter="test" name="category_template">
                <if condition="$index_tpl">
                  <volist name="index_tpl" id="list">
                      <option>{$list}</option>
                  </volist>
                  <else />
                  <option value="">请选择</option>
                  </if>
               </select>
           </div>
          </td>
        </tr>
        <tr>
          <td><label>列表模板</label></td>
          <td>
            <div class="layui-input-inline" style="width:500px;">
               <select lay-filter="test" name="list_template">
                <if condition="$list_tpl">
                  <volist name="list_tpl" id="list">
                    <option>{$list}</option>
                  </volist>
                  <else />
                  <option value="">请选择</option>
                  </if>
               </select>
           </div>
          </td>
        </tr>
         <tr>
          <td><label>内容模板</label></td>
          <td>
            <div class="layui-input-inline" style="width:500px;">
               <select lay-filter="test" name="show_template">
                 <if condition="$show_tpl">
                  <volist name="show_tpl" id="list">
                    <option>{$list}</option>
                  </volist>
                  <else />
                  <option value="">请选择</option>
                  </if>
               </select>
           </div>
          </td>
        </tr>
        <else />
          <tr>
          <td><label>内容模板</label></td>
          <td>
            <div class="layui-input-inline" style="width:500px;">
               <select lay-filter="test" name="show_template">
                <if condition="$page_tpl">
                  <volist name="page_tpl" id="list">
                    <option>{$list}</option>
                  </volist>
                  <else />
                  <option value="">请选择</option>
                  </if>
               </select>
           </div>
          </td>
        </tr>
        </if>
      </tbody>
    </table>
    <div class="layui-form-item">
      <div class="layui-input-block">
        <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
      </div>
    </div>
    </div>
</div>
</form>    

<script src="__ADMIN__/layui/layui.js" charset="utf-8"></script>
<script>
layui.use('element', function(){
  var $ = layui.jquery
  ,element = layui.element(); //Tab的切换功能，切换事件监听等，需要依赖element模块
});
layui.use('form', function(){
  var form = layui.form();
  });
$("#cof").click(function(){
  a=$(window).height();
  $("#see_height").css("height",a);
});
//外部链接显示 
$("#is_url").click(function(){
   $("#cate_url").css("display","");
});
$("#no_url").click(function(){
   $("#cate_url").css("display","none");
});
//单条添加绑定
$("#normal").click(function(){
  s=("#normal_add");
  $("#batch_add").css("display","none");
  $("#normal_add").css("display","block");
  $("#path").css("display","");
});

//批量添加绑定
$("#batch").click(function(){
   $("#batch_add").css("display","block");
   $("#normal_add").css("display","none");
   $("#path").css("display","none");
});
</script>
</body>
</html>